﻿<UserControl x:Class="SpringGraphTwitterExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:graph="clr-namespace:SpringGraph;assembly=SpringGraph"
    xmlns:graphControls="clr-namespace:SpringGraph.Controls;assembly=SpringGraph"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>
        <ControlTemplate x:Key="UserTemplate" >
            <Grid>
                <Border Padding="15" Background="#FF727A9F" CornerRadius="20" />
                <Border x:Name="LayoutRoot" Padding="15" Background="#99727A9F" CornerRadius="20" >
                   
                    <StackPanel Orientation="Vertical" Margin="15">
                        <Grid HorizontalAlignment="Center">
                            <Image x:Name="image" Source="{Binding ProfileImage}" Height="48" Width="48" />
                        </Grid>
                    
                        <TextBlock Text="{Binding Name}" Margin="0, 10, 0, 0" />

                        <HyperlinkButton Content="{Binding ScreenName}" Click="HyperlinkButton_Click" Margin="0, 10, 0, 0" />
                    </StackPanel>
                </Border>
            </Grid>
        </ControlTemplate>

        <Line x:Key="graphEdge" Stroke="Gray" Fill="Gray" StrokeThickness="1" />
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="White">
        
        <graph:SpringGraph x:Name="Graph" 
                           NodeTemplate="{StaticResource UserTemplate}" >

            <graphControls:NavControl HorizontalAlignment="Left" VerticalAlignment="Top" 
                  Margin="10,10,0,0" />

        </graph:SpringGraph>
        
    </Grid>
</UserControl>
